package cn.xi.domain;

public class GeneralResult<T> {
    private T data;
    private Boolean flag;
    private String msg;
    private Integer code;

    @Override
    public String toString() {
        return "GeneralResult{" +
                "data=" + data +
                ", flag=" + flag +
                ", msg='" + msg + '\'' +
                ", code=" + code +
                '}';
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public Boolean getFlag() {
        return flag;
    }

    public void setFlag(Boolean flag) {
        this.flag = flag;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public GeneralResult() {
    }

    public GeneralResult(T data, Boolean flag, String msg, Integer code) {
        this.data = data;
        this.flag = flag;
        this.msg = msg;
        this.code = code;
    }
}
